3.8.1 \(\int \frac {x^3}{a-b+2 a x^2+a x^4} \, dx\)

Optimal. Leaf size=56 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}+\frac {\log \left (a x^4+2 a x^2+a-b\right )}{4 a} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {1114, 634, 618, 206, 628} \begin {gather*} \frac {\log \left (a x^4+2 a x^2+a-b\right )}{4 a}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^3/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

ArcTanh[(Sqrt[a]*(1 + x^2))/Sqrt[b]]/(2*Sqrt[a]*Sqrt[b]) + Log[a - b + 2*a*x^2 + a*x^4]/(4*a)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1114

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)*(a +
 b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {x^3}{a-b+2 a x^2+a x^4} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {x}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\\ &=-\left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\right )+\frac {\operatorname {Subst}\left (\int \frac {2 a+2 a x}{a-b+2 a x+a x^2} \, dx,x,x^2\right )}{4 a}\\ &=\frac {\log \left (a-b+2 a x^2+a x^4\right )}{4 a}+\operatorname {Subst}\left (\int \frac {1}{4 a b-x^2} \, dx,x,2 a \left (1+x^2\right )\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}+\frac {\log \left (a-b+2 a x^2+a x^4\right )}{4 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 51, normalized size = 0.91 \begin {gather*} \frac {\log \left (a \left (x^2+1\right )^2-b\right )+\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{\sqrt {b}}}{4 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^3/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

((2*Sqrt[a]*ArcTanh[(Sqrt[a]*(1 + x^2))/Sqrt[b]])/Sqrt[b] + Log[-b + a*(1 + x^2)^2])/(4*a)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^3}{a-b+2 a x^2+a x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[x^3/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

IntegrateAlgebraic[x^3/(a - b + 2*a*x^2 + a*x^4), x]

________________________________________________________________________________________

fricas [A]  time = 0.96, size = 134, normalized size = 2.39 \begin {gather*} \left [\frac {b \log \left (a x^{4} + 2 \, a x^{2} + a - b\right ) + \sqrt {a b} \log \left (\frac {a x^{4} + 2 \, a x^{2} + 2 \, \sqrt {a b} {\left (x^{2} + 1\right )} + a + b}{a x^{4} + 2 \, a x^{2} + a - b}\right )}{4 \, a b}, \frac {b \log \left (a x^{4} + 2 \, a x^{2} + a - b\right ) - 2 \, \sqrt {-a b} \arctan \left (\frac {\sqrt {-a b}}{a x^{2} + a}\right )}{4 \, a b}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3/(a*x^4+2*a*x^2+a-b),x, algorithm="fricas")

[Out]

[1/4*(b*log(a*x^4 + 2*a*x^2 + a - b) + sqrt(a*b)*log((a*x^4 + 2*a*x^2 + 2*sqrt(a*b)*(x^2 + 1) + a + b)/(a*x^4
+ 2*a*x^2 + a - b)))/(a*b), 1/4*(b*log(a*x^4 + 2*a*x^2 + a - b) - 2*sqrt(-a*b)*arctan(sqrt(-a*b)/(a*x^2 + a)))
/(a*b)]

________________________________________________________________________________________

giac [A]  time = 0.26, size = 46, normalized size = 0.82 \begin {gather*} -\frac {\arctan \left (\frac {a x^{2} + a}{\sqrt {-a b}}\right )}{2 \, \sqrt {-a b}} + \frac {\log \left (a x^{4} + 2 \, a x^{2} + a - b\right )}{4 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3/(a*x^4+2*a*x^2+a-b),x, algorithm="giac")

[Out]

-1/2*arctan((a*x^2 + a)/sqrt(-a*b))/sqrt(-a*b) + 1/4*log(a*x^4 + 2*a*x^2 + a - b)/a

________________________________________________________________________________________

maple [A]  time = 0.00, size = 49, normalized size = 0.88 \begin {gather*} \frac {\arctanh \left (\frac {2 a \,x^{2}+2 a}{2 \sqrt {a b}}\right )}{2 \sqrt {a b}}+\frac {\ln \left (a \,x^{4}+2 a \,x^{2}+a -b \right )}{4 a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3/(a*x^4+2*a*x^2+a-b),x)

[Out]

1/4/a*ln(a*x^4+2*a*x^2+a-b)+1/2/(a*b)^(1/2)*arctanh(1/2*(2*a*x^2+2*a)/(a*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 2.97, size = 60, normalized size = 1.07 \begin {gather*} -\frac {\log \left (\frac {a x^{2} + a - \sqrt {a b}}{a x^{2} + a + \sqrt {a b}}\right )}{4 \, \sqrt {a b}} + \frac {\log \left (a x^{4} + 2 \, a x^{2} + a - b\right )}{4 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3/(a*x^4+2*a*x^2+a-b),x, algorithm="maxima")

[Out]

-1/4*log((a*x^2 + a - sqrt(a*b))/(a*x^2 + a + sqrt(a*b)))/sqrt(a*b) + 1/4*log(a*x^4 + 2*a*x^2 + a - b)/a

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 153, normalized size = 2.73 \begin {gather*} \frac {\ln \left (x^2\,\sqrt {a^3\,b}+a\,b-a^2-a^2\,x^2\right )}{4\,a}+\frac {\ln \left (x^2\,\sqrt {a^3\,b}-a\,b+a^2+a^2\,x^2\right )}{4\,a}-\frac {\ln \left (x^2\,\sqrt {a^3\,b}-a\,b+a^2+a^2\,x^2\right )\,\sqrt {a^3\,b}}{4\,a^2\,b}+\frac {\ln \left (x^2\,\sqrt {a^3\,b}+a\,b-a^2-a^2\,x^2\right )\,\sqrt {a^3\,b}}{4\,a^2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3/(a - b + 2*a*x^2 + a*x^4),x)

[Out]

log(x^2*(a^3*b)^(1/2) + a*b - a^2 - a^2*x^2)/(4*a) + log(x^2*(a^3*b)^(1/2) - a*b + a^2 + a^2*x^2)/(4*a) - (log
(x^2*(a^3*b)^(1/2) - a*b + a^2 + a^2*x^2)*(a^3*b)^(1/2))/(4*a^2*b) + (log(x^2*(a^3*b)^(1/2) + a*b - a^2 - a^2*
x^2)*(a^3*b)^(1/2))/(4*a^2*b)

________________________________________________________________________________________

sympy [B]  time = 0.84, size = 110, normalized size = 1.96 \begin {gather*} \left (\frac {1}{4 a} - \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) \log {\left (x^{2} + \frac {4 a b \left (\frac {1}{4 a} - \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) + a - b}{a} \right )} + \left (\frac {1}{4 a} + \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) \log {\left (x^{2} + \frac {4 a b \left (\frac {1}{4 a} + \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) + a - b}{a} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3/(a*x**4+2*a*x**2+a-b),x)

[Out]

(1/(4*a) - sqrt(a**3*b)/(4*a**2*b))*log(x**2 + (4*a*b*(1/(4*a) - sqrt(a**3*b)/(4*a**2*b)) + a - b)/a) + (1/(4*
a) + sqrt(a**3*b)/(4*a**2*b))*log(x**2 + (4*a*b*(1/(4*a) + sqrt(a**3*b)/(4*a**2*b)) + a - b)/a)

________________________________________________________________________________________